package com.elvt.server.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.elvt.server.pojo.Department;
import com.elvt.server.utils.RespSult;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 作者：elvt
 * @since 2022-05-21
 */
public interface DepartmentMapper extends BaseMapper<Department> {
    /**
     * 获取所有部门
     * @return
     */
    List<Department> getAllDepartments(Integer parentId);

    void addDepartment(Department department);

    /**
     * 删除部门
     * @param dep
     */
    void deleteDepById(Department dep);
}
